//
//	MCIntrumentRecommandListModel.swift
//	Model file generated using JSONExport: https://github.com/Ahmed-Ali/JSONExport

import Foundation 
import ObjectMapper


class MCIntrumentRecommandListModel : NSObject, NSCoding, Mappable{

	var countId : String?
	var current : Int?
	var maxLimit : Int?
	var optimizeCountSql : Bool?
	var orders : [AnyObject]?
	var pages : Int?
	var records : [MCIntrumentRecommandRecord]?
	var searchCount : Bool?
	var size : Int?
	var total : Int?


	class func newInstance(map: Map) -> Mappable?{
		return MCIntrumentRecommandListModel()
	}
	required init?(map: Map){}
	private override init(){}

	func mapping(map: Map)
	{
		countId <- map["countId"]
		current <- map["current"]
		maxLimit <- map["maxLimit"]
		optimizeCountSql <- map["optimizeCountSql"]
		orders <- map["orders"]
		pages <- map["pages"]
		records <- map["records"]
		searchCount <- map["searchCount"]
		size <- map["size"]
		total <- map["total"]
		
	}

    /**
    * NSCoding required initializer.
    * Fills the data from the passed decoder
    */
    @objc required init(coder aDecoder: NSCoder)
	{
         countId = aDecoder.decodeObject(forKey: "countId") as? String
         current = aDecoder.decodeObject(forKey: "current") as? Int
         maxLimit = aDecoder.decodeObject(forKey: "maxLimit") as? Int
         optimizeCountSql = aDecoder.decodeObject(forKey: "optimizeCountSql") as? Bool
         orders = aDecoder.decodeObject(forKey: "orders") as? [AnyObject]
         pages = aDecoder.decodeObject(forKey: "pages") as? Int
         records = aDecoder.decodeObject(forKey: "records") as? [MCIntrumentRecommandRecord]
         searchCount = aDecoder.decodeObject(forKey: "searchCount") as? Bool
         size = aDecoder.decodeObject(forKey: "size") as? Int
         total = aDecoder.decodeObject(forKey: "total") as? Int

	}

    /**
    * NSCoding required method.
    * Encodes mode properties into the decoder
    */
    @objc func encode(with aCoder: NSCoder)
	{
		if countId != nil{
			aCoder.encode(countId, forKey: "countId")
		}
		if current != nil{
			aCoder.encode(current, forKey: "current")
		}
		if maxLimit != nil{
			aCoder.encode(maxLimit, forKey: "maxLimit")
		}
		if optimizeCountSql != nil{
			aCoder.encode(optimizeCountSql, forKey: "optimizeCountSql")
		}
		if orders != nil{
			aCoder.encode(orders, forKey: "orders")
		}
		if pages != nil{
			aCoder.encode(pages, forKey: "pages")
		}
		if records != nil{
			aCoder.encode(records, forKey: "records")
		}
		if searchCount != nil{
			aCoder.encode(searchCount, forKey: "searchCount")
		}
		if size != nil{
			aCoder.encode(size, forKey: "size")
		}
		if total != nil{
			aCoder.encode(total, forKey: "total")
		}

	}

}